home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.mactech.com 2010
/
ftp.mactech.com.tar
/
ftp.mactech.com
/
machack
/
Hacks96
/
BootingGallery.sit
/
Booting Gallery
/
Booting Gallery (source)
/
Sources
/
Duck Game Sources
/
DuckGame.h
< prev
next >
Wrap
Text File
|
1996-06-22
|
1KB
|
59 lines
#ifndef __DuckGame_H__
#define __DuckGame_H__
/***
* Created by Bill Hubauer on Fri, Jun 21, 1996 @ 2:25 AM.
*
***/
#ifndef __SpriteGame_H__
#include "SpriteGame.h"
#endif
class CDuckGame : public CSpriteGame
{
public:
CDuckGame();
virtual ~CDuckGame();
virtual OSErr Initialize();
protected:
virtual CSprite* MakeExtensionSprite(GWorldPtr image,RgnHandle mask) ; //Override
virtual void DrawBackground(const Rect& inBounds);
};
class CDuckSprite : public CGameSprite
{
public:
CDuckSprite(CSpriteWorld* world,CSpriteGame* game,GWorldPtr image,
RgnHandle mask);
virtual ~CDuckSprite();
enum { kDuckStartTop = 200, kDuckStartLeft = 0};
virtual void UpdatePosition() ; //Override
virtual Boolean WasHitBy(CSprite* thisOne);
protected:
OSErr BuildDuckImage(GWorldPtr iconImage,RgnHandle iconMask);
void SetNextDuck();
OSErr CopyBaseImage(short id,GWorldPtr& outGWorld,RgnHandle& outMask);
OSErr Superimpose(GWorldPtr iconImage,RgnHandle iconMask,GWorldPtr duck,RgnHandle duckMask);
enum { kMoveHInterval = 5 };
enum { kQuackID = 1001};
enum { kDuck1 = 1001,kDuck2 = 1002};
struct DuckEntry{
GWorldPtr image;
RgnHandle mask;
};
DuckEntry fDucks[2];
short fCurDuck;
};
#endif